'\" te
.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH NET_ZONEIDTONETID 9F "May 1, 2008"
.SH NAME
net_zoneidtonetid \- map a zoneid_t structure identifier to a netid_t structure
.SH SYNOPSIS
.nf
#include <sys/neti.h>

\fBnetid_t\fR \fBnet_zoneidtonetid\fR(\fBconst\fR \fBzoneid_t\fR \fIzone\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI).
.SH PARAMETERS
.ne 2
.na
\fB\fIzone\fR\fR
.ad
.RS 8n
valid \fBzoneid_t\fR structure that refers to a running zone.
.RE

.SH DESCRIPTION
The \fBnet_zoneidtonetid()\fR function maps the given \fBzoneid_t\fR structure
(used to represent a zone that is currently running) into a \fBnetid_t\fR
structure that is associated with the \fBIP\fR instance supporting network
functions for that zone.
.SH RETURN VALUES
The \fBnet_zoneidtonetid()\fR function returns -1 if no mapping took place.
Otherwise, it returns the \fBnetid_t\fR structure currently used by the
\fBzoneid_t\fR structure. For zones that are using a shared \fBIP\fR instance,
the \fBnetid_t\fR structure for the instance owned by the global zone is
returned.
.SH CONTEXT
The \fBnet_zoneidtonetid()\fR function may be called from user,  kernel, or
interrupt context.
.SH ATTRIBUTES
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
.TE

.SH SEE ALSO
.BR attributes (7),
.BR net_netidtozonid (9F)
